.class public Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;
.super Lcom/estrongs/android/pop/esclasses/ESActivity;
.source "GoogleWebSignIn.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$c;,
        Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$b;
    }
.end annotation


# static fields
.field private static k:I = 0x1


# instance fields
.field private d:Landroid/os/Handler;

.field private e:Landroid/webkit/WebView;

.field private f:Landroid/view/View;

.field private g:Landroid/widget/ProgressBar;

.field private h:Ljava/lang/String;

.field private i:Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$c;

.field private j:Landroid/webkit/WebChromeClient;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/pop/esclasses/ESActivity;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->e:Landroid/webkit/WebView;

    .line 3
    iput-object v0, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->f:Landroid/view/View;

    .line 4
    iput-object v0, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->g:Landroid/widget/ProgressBar;

    .line 5
    new-instance v1, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$c;

    invoke-direct {v1, p0, v0}, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$c;-><init>(Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$a;)V

    iput-object v1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->i:Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$c;

    .line 6
    new-instance v0, Landroid/webkit/WebChromeClient;

    invoke-direct {v0}, Landroid/webkit/WebChromeClient;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->j:Landroid/webkit/WebChromeClient;

    return-void
.end method

.method static synthetic A()I
    .locals 1

    .line 1
    sget v0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->k:I

    return v0
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;)Landroid/os/Handler;
    .locals 0

    .line 2
    iget-object p0, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->d:Landroid/os/Handler;

    return-object p0
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 0

    .line 1
    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method private a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 7

    const-string v0, "\\?"

    .line 3
    invoke-virtual {p1, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    .line 4
    array-length v1, v0

    const/4 v2, 0x2

    if-eq v1, v2, :cond_0

    const-string v0, "#"

    .line 5
    invoke-virtual {p1, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    .line 6
    :cond_0
    array-length p1, v0

    if-ne p1, v2, :cond_2

    const/4 p1, 0x1

    .line 7
    aget-object v0, v0, p1

    const-string v1, "&"

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    .line 8
    array-length v1, v0

    const/4 v3, 0x0

    const/4 v4, 0x0

    :goto_0
    if-ge v4, v1, :cond_2

    aget-object v5, v0, v4

    const-string v6, "="

    .line 9
    invoke-virtual {v5, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v5

    .line 10
    array-length v6, v5

    if-ne v6, v2, :cond_1

    aget-object v6, v5, v3

    invoke-virtual {v6, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_1

    .line 11
    aget-object p1, v5, p1

    return-object p1

    :cond_1
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    :cond_2
    const-string p1, ""

    return-object p1
.end method

.method static synthetic b(Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;)Ljava/lang/String;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->h:Ljava/lang/String;

    return-object p0
.end method


# virtual methods
.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
    .locals 1

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESActivity;->onConfigurationChanged(Landroid/content/res/Configuration;)V

    .line 2
    new-instance p1, Landroid/util/DisplayMetrics;

    invoke-direct {p1}, Landroid/util/DisplayMetrics;-><init>()V

    .line 3
    invoke-virtual {p0}, Landroid/app/Activity;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v0

    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 2

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESActivity;->onCreate(Landroid/os/Bundle;)V

    const p1, 0x7f0c0296

    .line 2
    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESActivity;->setContentView(I)V

    .line 3
    new-instance p1, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$b;

    const/4 v0, 0x0

    invoke-direct {p1, p0, v0}, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$b;-><init>(Landroid/app/Activity;Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$a;)V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->d:Landroid/os/Handler;

    const p1, 0x7f09074c

    .line 4
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/webkit/WebView;

    iput-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->e:Landroid/webkit/WebView;

    const p1, 0x7f09015f

    .line 5
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ProgressBar;

    iput-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->g:Landroid/widget/ProgressBar;

    const p1, 0x7f09071b

    .line 6
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->f:Landroid/view/View;

    .line 7
    iget-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->g:Landroid/widget/ProgressBar;

    const/4 v0, 0x0

    invoke-virtual {p1, v0}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 8
    iget-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->f:Landroid/view/View;

    invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V

    .line 9
    iget-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->e:Landroid/webkit/WebView;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->i:Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn$c;

    invoke-virtual {p1, v1}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 10
    iget-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->e:Landroid/webkit/WebView;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->j:Landroid/webkit/WebChromeClient;

    invoke-virtual {p1, v1}, Landroid/webkit/WebView;->setWebChromeClient(Landroid/webkit/WebChromeClient;)V

    .line 11
    iget-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->e:Landroid/webkit/WebView;

    invoke-virtual {p1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object p1

    .line 12
    invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setSavePassword(Z)V

    .line 13
    invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setSaveFormData(Z)V

    const-string v0, "utf-8"

    .line 14
    invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setDefaultTextEncodingName(Ljava/lang/String;)V

    .line 15
    invoke-static {}, Lcom/estrongs/android/util/o0;->d()Z

    move-result v0

    if-nez v0, :cond_0

    sget-boolean v0, Lcom/estrongs/android/pop/j;->M:Z

    if-eqz v0, :cond_1

    :cond_0
    const/4 v0, 0x1

    .line 16
    invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setUseWideViewPort(Z)V

    .line 17
    invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setLoadWithOverviewMode(Z)V

    .line 18
    iget-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->e:Landroid/webkit/WebView;

    const/16 v0, 0x14

    invoke-virtual {p1, v0}, Landroid/webkit/WebView;->setInitialScale(I)V

    .line 19
    :cond_1
    invoke-static {p0}, Landroid/webkit/CookieSyncManager;->createInstance(Landroid/content/Context;)Landroid/webkit/CookieSyncManager;

    .line 20
    invoke-static {}, Landroid/webkit/CookieSyncManager;->getInstance()Landroid/webkit/CookieSyncManager;

    move-result-object p1

    invoke-virtual {p1}, Landroid/webkit/CookieSyncManager;->startSync()V

    .line 21
    invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager;

    move-result-object p1

    .line 22
    invoke-virtual {p1}, Landroid/webkit/CookieManager;->removeAllCookie()V

    .line 23
    invoke-static {}, Les/r30;->c()Les/r30;

    move-result-object p1

    .line 24
    invoke-virtual {p1}, Les/r30;->getOAuthLoginUrl()Ljava/lang/String;

    move-result-object p1

    .line 25
    iget-object v0, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->e:Landroid/webkit/WebView;

    invoke-virtual {v0, p1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    const-string v0, "://"

    .line 26
    invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-lez v0, :cond_2

    add-int/lit8 v0, v0, 0x3

    .line 27
    invoke-virtual {p1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p1

    :cond_2
    iput-object p1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->h:Ljava/lang/String;

    return-void
.end method

.method protected onDestroy()V
    .locals 2

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->onDestroy()V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->d:Landroid/os/Handler;

    if-eqz v0, :cond_0

    const/4 v1, 0x0

    .line 3
    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    .line 4
    iput-object v1, p0, Lcom/estrongs/android/pop/app/premium/account/GoogleWebSignIn;->d:Landroid/os/Handler;

    :cond_0
    return-void
.end method
